if (window['AdSDK']) {
    class Parser {
        constructor() {
            this._sdk = window['AdSDK']
        }

        parse() {

            let createBannerAd = this._sdk.createBannerAd
            this._sdk.createBannerAd = function (obj) {
                return createBannerAd(obj.key, obj.adUnitId, obj.num)
            }

            let createInterstitialAd = this._sdk.createInterstitialAd
            this._sdk.createInterstitialAd = function (obj) {
                return createInterstitialAd(obj.key, obj.adUnitId, obj.num)
            }

            let createRewardedVideoAd = this._sdk.createRewardedVideoAd
            this._sdk.createRewardedVideoAd = function (obj) {
                return createRewardedVideoAd(obj.key, obj.adUnitId, obj.num)
            }

            this._sdk.getDataPath = function () {
                let rt = window['runtime']()
                return rt.env.USER_DATA_PATH + '/'
            }

            this._sdk.getFileSystemManager = function () {
                if (window['runtime']) {
                    let rt = window['runtime']()
                    if (rt) {
                        return rt.gtFileSystemManager()
                    }
                }
                return null
            }
        }
    }
    new Parser().parse();
}